#include <stdio.h>
int main(int argc, char const *argv[])
{
    char str[100] = {0};
    printf("请输入一个字符串>:");
    scanf("%s", str);
    printf("str=%s\n", str);

    int len = 0;
    while (str[len] != '\0')
        len++;
    printf("len=%d\n", len);
    char t;
    for (int i = 0; i < len / 2; i++)
    {
        t = str[i];
        str[i] = str[len - i - 1];
        str[len - i - 1] = t;
    }
    printf("str=%s\n", str);

    return 0;
}
